package com.founder.chd_daily_query.entity.alarm;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import javax.xml.crypto.Data;

import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "SEND_PUR_UNITPRICE_MODEL", schema = "RBD_ALARM", catalog = "")
public class SendPurUnitPriceModelEntity {
    private String supplyProvinceId;
    private String powerstationId;
    private String contractCode;
    private String planAttribute;
    private String transportType;
    private String vendorId;
    private String receiveOrgId;
    private Long contractAmount;
    private Long priceContract;
    private Long coalUnitpriceSend;
    private Long coalUnitpricePur;
    private Long purchasingUnitprice;
    private Long sendplanUnitprice;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private String status;
    private String differenceSingle;
    private String contractId;
    private String purchaseSalePlanId;
    private String contractName;

    @Basic
    @Column(name = "SUPPLY_PROVINCE_ID")
    public String getSupplyProvinceId() {
        return supplyProvinceId;
    }

    public void setSupplyProvinceId(String supplyProvinceId) {
        this.supplyProvinceId = supplyProvinceId;
    }

    @Basic
    @Column(name = "POWERSTATION_ID")
    public String getPowerstationId() {
        return powerstationId;
    }

    public void setPowerstationId(String powerstationId) {
        this.powerstationId = powerstationId;
    }

    @Basic
    @Column(name = "CONTRACT_CODE")
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    @Basic
    @Column(name = "PLAN_ATTRIBUTE")
    public String getPlanAttribute() {
        return planAttribute;
    }

    public void setPlanAttribute(String planAttribute) {
        this.planAttribute = planAttribute;
    }

    @Basic
    @Column(name = "TRANSPORT_TYPE")
    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    @Basic
    @Column(name = "VENDOR_ID")
    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    @Basic
    @Column(name = "RECEIVE_ORG_ID")
    public String getReceiveOrgId() {
        return receiveOrgId;
    }

    public void setReceiveOrgId(String receiveOrgId) {
        this.receiveOrgId = receiveOrgId;
    }

    @Basic
    @Column(name = "CONTRACT_AMOUNT")
    public Long getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(Long contractAmount) {
        this.contractAmount = contractAmount;
    }

    @Basic
    @Column(name = "PRICE_CONTRACT")
    public Long getPriceContract() {
        return priceContract;
    }

    public void setPriceContract(Long priceContract) {
        this.priceContract = priceContract;
    }

    @Basic
    @Column(name = "COAL_UNITPRICE_SEND")
    public Long getCoalUnitpriceSend() {
        return coalUnitpriceSend;
    }

    public void setCoalUnitpriceSend(Long coalUnitpriceSend) {
        this.coalUnitpriceSend = coalUnitpriceSend;
    }

    @Basic
    @Column(name = "COAL_UNITPRICE_PUR")
    public Long getCoalUnitpricePur() {
        return coalUnitpricePur;
    }

    public void setCoalUnitpricePur(Long coalUnitpricePur) {
        this.coalUnitpricePur = coalUnitpricePur;
    }

    @Basic
    @Column(name = "PURCHASING_UNITPRICE")
    public Long getPurchasingUnitprice() {
        return purchasingUnitprice;
    }

    public void setPurchasingUnitprice(Long purchasingUnitprice) {
        this.purchasingUnitprice = purchasingUnitprice;
    }

    @Basic
    @Column(name = "SENDPLAN_UNITPRICE")
    public Long getSendplanUnitprice() {
        return sendplanUnitprice;
    }

    public void setSendplanUnitprice(Long sendplanUnitprice) {
        this.sendplanUnitprice = sendplanUnitprice;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "DIFFERENCE_SINGLE")
    public String getDifferenceSingle() {
        return differenceSingle;
    }

    public void setDifferenceSingle(String differenceSingle) {
        this.differenceSingle = differenceSingle;
    }



    @Id
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "PURCHASE_SALE_PLAN_ID")
    public String getPurchaseSalePlanId() {
        return purchaseSalePlanId;
    }

    public void setPurchaseSalePlanId(String purchaseSalePlanId) {
        this.purchaseSalePlanId = purchaseSalePlanId;
    }

    @Column(name = "CONTRACT_NAME")
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Override
    public String toString() {
        return "SendPurUnitPriceModelEntity{" +
                "supplyProvinceId='" + supplyProvinceId + '\'' +
                ", powerstationId='" + powerstationId + '\'' +
                ", contractCode='" + contractCode + '\'' +
                ", planAttribute='" + planAttribute + '\'' +
                ", transportType='" + transportType + '\'' +
                ", vendorId='" + vendorId + '\'' +
                ", receiveOrgId='" + receiveOrgId + '\'' +
                ", contractAmount=" + contractAmount +
                ", priceContract=" + priceContract +
                ", coalUnitpriceSend=" + coalUnitpriceSend +
                ", coalUnitpricePur=" + coalUnitpricePur +
                ", purchasingUnitprice=" + purchasingUnitprice +
                ", sendplanUnitprice=" + sendplanUnitprice +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", status='" + status + '\'' +
                ", differenceSingle='" + differenceSingle + '\'' +
                ", contractId='" + contractId + '\'' +
                ", purchaseSalePlanId='" + purchaseSalePlanId + '\'' +
                ", contractName='" + contractName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SendPurUnitPriceModelEntity that = (SendPurUnitPriceModelEntity) o;
        return Objects.equals(supplyProvinceId, that.supplyProvinceId) &&
                Objects.equals(powerstationId, that.powerstationId) &&
                Objects.equals(contractCode, that.contractCode) &&
                Objects.equals(planAttribute, that.planAttribute) &&
                Objects.equals(transportType, that.transportType) &&
                Objects.equals(vendorId, that.vendorId) &&
                Objects.equals(receiveOrgId, that.receiveOrgId) &&
                Objects.equals(contractAmount, that.contractAmount) &&
                Objects.equals(priceContract, that.priceContract) &&
                Objects.equals(coalUnitpriceSend, that.coalUnitpriceSend) &&
                Objects.equals(coalUnitpricePur, that.coalUnitpricePur) &&
                Objects.equals(purchasingUnitprice, that.purchasingUnitprice) &&
                Objects.equals(sendplanUnitprice, that.sendplanUnitprice) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(status, that.status) &&
                Objects.equals(differenceSingle, that.differenceSingle) &&


                Objects.equals(contractId, that.contractId) &&
                Objects.equals(purchaseSalePlanId, that.purchaseSalePlanId) &&
                Objects.equals(contractName, that.contractName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(supplyProvinceId, powerstationId, contractCode, planAttribute, transportType, vendorId, receiveOrgId, contractAmount, priceContract, coalUnitpriceSend, coalUnitpricePur, purchasingUnitprice, sendplanUnitprice, createDate, lastUpdateDate, status, differenceSingle, contractId, purchaseSalePlanId, contractName);
    }
}
